﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL;

namespace BLL
{
    public class CategoryBs
    {
          private readonly CategoryDb _db;

        public CategoryBs()
        {
            _db = new CategoryDb();
        }

        public IEnumerable<BOL.tbl_Category> GetAll()
        {
            return _db.GetAll();
        }

        public BOL.tbl_Category GetById(int id)
        {
            return _db.GetById(id);
        }

        public void Insert(BOL.tbl_Category category)
        {
            _db.Insert(category);
        }

        public void Update(BOL.tbl_Category category)
        {
            _db.Update(category);
        }

        public void Delete(int id)
        {
            _db.Delete(id);
        }
    }
}
